// Decompiled by GOOSIN CO,LTD Copyright 2010 Pavel Kouznetsov.
// home page: http://www.Goosin.net
// Decompiler options: packimports(3) fieldsfirst ansi space 
// Source File Name:   getRecordCount.java

package include.query;

import include.nseer_db.nseer_db;
import java.sql.ResultSet;

public class getRecordCount
{

	private String dbase;
	private String sql;
	private ResultSet rs;
	private int intRowCount;
	private nseer_db dba;

	public getRecordCount()
	{
		dbase = "";
		sql = "";
		rs = null;
		intRowCount = 0;
	}

	public int count(String dbase, String query)
	{
		this.dbase = dbase;
		sql = query;
		try
		{
			dba = new nseer_db(dbase);
			rs = dba.executeQuery(sql);
			intRowCount = 0;
			if (rs.last())
				intRowCount = rs.getRow();
		}
		catch (Exception ex)
		{
			ex.printStackTrace();
		}
		dba.close();
		return intRowCount;
	}
}
